﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MainFrm.Master" AutoEventWireup="true" CodeBehind="ServerPoint.aspx.cs" Inherits="Ewts.Project.ServerPoint" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<script type="text/javascript">
    function selectvalue() {
        var haveselectvalue = $(".dropcjosalesman option:selected").val();
        for (var i = 0; i < document.getElementById("EwtsConext_chksalesman").getElementsByTagName("input").length; i++) {
            var a = "EwtsConext_chksalesman_" + i;
            var chkselectvalue = document.getElementById(a).value;
            if (chkselectvalue == haveselectvalue) {
                if ($("#haveselectinput").val() != "") {
                    var b = $("#haveselectinput").val();
                    document.getElementById(b).checked = false;
                }
                document.getElementById(a).checked = true;
                $("#haveselectinput").val(a);
            }
        }  
    }
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="EwtsConext" runat="server">
  <div id="content">
            <div class="box content">
              <table cellpadding="0" cellspacing="0" class="forms">
              <%--  <caption>新增项目</caption>--%>
                <tr>
	                    <td align="right">
		                    区域名称 ：
                            </td>
                            <td>
	                     <asp:label id="lblAreaName" runat="server"></asp:label>
	                    </td>
                </tr>
                <tr>
                    <td><label><span class="required">*</span>业务员：</label></td>
                    <td colspan="7" class="choose">
                        <asp:CheckBoxList ID="chksalesman" runat="server" RepeatDirection="Horizontal" RepeatColumns ="4">
                        </asp:CheckBoxList>
                    </td>
                </tr>

                <tr>
                 <td>
                    <input type="hidden" id="txtid" runat="server" />
                    <label><span class="required">*</span>开CJO人员：</label>
                  </td>
                  <td>
                      <asp:DropDownList ID="dropcjosalesman" CssClass="dropcjosalesman" runat="server" onchange="selectvalue();">
                      </asp:DropDownList>
                      <input type="hidden" id="haveselectinput"/>
                  </td>
                </tr>

                <tr>
                 <td>
                    <input type="hidden" id="Hidden1" runat="server" />
                    <label><span class="required">*</span>授权人员：</label>
                  </td>
                  <td>
                      <asp:DropDownList ID="droporderperson" runat="server">
                      </asp:DropDownList>
                  </td>
                </tr>
                 <tr>
                  <td>
                    <label><span class="required">*</span>服务点选择：</label>
                  </td>
                  <td>
                      <asp:DropDownList ID="serverPoint" runat="server">
                      </asp:DropDownList>
                  </td>
                </tr>
                <tr>
                     <td class="paddingL">
                      <asp:Button ID="Button1"
                          runat="server" Text="添加" onclick="Button1_Click"/></td>
                </tr>
              </table>
            </div>
<br />
<div class="shadow">
    <asp:Repeater ID="rept" runat="server" OnItemCommand="BtnDel_Click">
      <HeaderTemplate>

    <table id="tbCustomer" class="display" cellpadding="0" cellspacing="0" border="0" style="width:100%;">
 
      <thead>
 
        <tr>
             <th>序号</th>
             <th>区域名称</th>
             <th>服务点名称</th>
             <th>业务员</th>
             <th>开CJO人员</th>
             <th>授权人员</th>
             <th>操作</th>
 
        </tr>
 
      </thead>
 
      <tbody>
 
  </HeaderTemplate>
 
  <ItemTemplate>
 
    <tr style=" text-align:center;">
      <td><%# Container.ItemIndex +1 %></td>
      <td><%# Eval("AreaName") %></td>    
      <td><%# Eval("ServerPointName")%></td> 
      <td><%# Eval("LookSalesmanTrueName").ToString().Replace('@', ' ')%></td> 
      <td><%# Eval("CjopersonTrueName")%></td> 
      <td><%# Eval("PowerpersonTrueName")%></td> 

      <td>  <a href="/Project/AllocationLookSaleman.aspx?cityid=<%# Eval("id")%>&ServerAreaID=<%#Eval("ServerAreaID") %>">分配地址/人员</a>&nbsp
      <a href="ServerPoint.aspx?id=<%#Eval("ServerAreaID") %>&ServerPointID=<%#Eval("id") %>">编辑服务点</a>&nbsp
      <asp:LinkButton ID="LinkBtnDel" OnClientClick="return confirm('确定要删除吗?')" CommandName='<%# Eval("id") %>' runat="server">删除服务点</asp:LinkButton></td>
 
    </tr>
 
  </ItemTemplate>
 
  <FooterTemplate>
 
    </tbody>
 
    </table>
 
  </FooterTemplate>


    </asp:Repeater>
</div>
    <script type="text/javascript">
        $(document).ready(function () {
            $('#tbCustomer').dataTable({ "oLanguage":
                 { "sUrl": "/jquery/jquery.dataTable.cn.txt" },
                "bJQueryUI": true,
                "sPaginationType": "full_numbers",
                'bPaginate': true,
                "bProcessing": true,
                "iDisplayLength": 20,
                "bSort": true,
                "aaSorting": [[0, "desc"]]
            });

        });
 
</script>
    </div>
</asp:Content>
